﻿using Itech_Run.Application.Shared;
using Itech_Run.Sys.Application.Contracts.Service;
using Itech_Run.Sys.Domain.Entity;
using Volo.Abp.Domain.Repositories;

namespace Itech_Run.Sys.Application.Service
{
    public class SysTokenGreyService : BaseApplicationService<Sys_TokenGrey>, ISysTokenGreyService
    {
        private readonly IRepository<Sys_TokenGrey, string> _sysTokenGreyRepository;
        public SysTokenGreyService(IRepository<Sys_TokenGrey, string> sysTokenGreyRepository)
        {
            _sysTokenGreyRepository = sysTokenGreyRepository;
        }
        public async Task<List<string>> GetTokenGreyListAsync()
        {
            return (await _sysTokenGreyRepository.GetQueryableAsync()).Select(s => s.Token).ToList();
        }
    }
}
